package pages.masterPage;

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.link.Link;

import pages.administration.AdministrationPage;

public class MasterPage extends WebPage
{
	private static final long serialVersionUID = 1L;
	
	public MasterPage()
	{
		initContent();
	}

	private void initContent() 
	{
		//logout link
		add(new Link<Void>("logout") 
			{
				private static final long serialVersionUID = 1L;

				@Override
				public void onClick() 
				{
					getSession().invalidate();
				}
		});
		
		//administration link
		add(new Link<Void>("administration") 
				{
					private static final long serialVersionUID = 1L;

					@Override
					public void onClick() 
					{
						setResponsePage(AdministrationPage.class);
					}
			});
		
	}

}
